#include <iostream>
#include <vector>
#include "include/car.h"
#include "include/student.h"
#include "include/allocate.h"
#include "include/write.h"
#include "include/read.h"
int main(){
    // 小车信息初始化
    std::vector<CAR> car = car_init();
    // for (int i = 0; i < 10; i++){
    //     std::cout << "CAR[" << i << "].id = " <<  car[i].id << std::endl;
    //     std::cout << "CAR[" << i << "].basePlate.id = " <<  car[i].basePlate.id << std::endl;
    // }

    // std::cout << car[0].agx.aiPerformance << std::endl;
    // std::cout << car[0].agx.cudaCores << std::endl;
    // std::cout << car[0].agx.memory << std::endl;
    // std::cout << car[0].agx.model << std::endl;
    // std::cout << car[0].agx.storage << std::endl;
    // std::cout << car[0].agx.tensorCores << std::endl;

    // std::cout << car[0].basePlate.groundClearance << std::endl;

    // 学生信息初始化
    std::vector<Student> stu = stu_init();
    // for (int i = 0; i < 10; i++){
    //     std::cout << stu[i].studentID << "-" << stu[i].name << std::endl;
    // }

    // 小车分配给学生
    std::map<int,int>carToStu =  allocate(10);
    // std::cout << "allocate结果:" << std::endl;
    // for (auto it = carToStu.begin(); it != carToStu.end(); it++){
    //     std::cout << it->first << "-" << it->second << std::endl;
    // }

    // 写入信息
    writeInfo(car,stu,carToStu);
    
    // 读取信息
    readInfo();
}